<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script src="https://unpkg.com/vue@3/dist/vue.global.js"></script>
    <div id="id">
        {{message}}
        <p>
            我是{{obj.name}},今年{{obj.age}}岁</br>
            我是函数fn我的返回值为{{fn()}}
        </p>
    </div>

    <script>
        Vue.createApp({
            setup() {
                const message = 'helloword'
                const obj = {
                    name: '张三',
                    age: 20
                }
                const fn = () => {
                    return 666
                }
                return {
                    message,
                    obj,
                    fn
                }
            }
        }).mount('#id')
    </script>
</body>

</html>